/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.playground.core.entity.boardgame.chesslikegame;

import com.playground.core.entity.boardgame.Square;

/**
 *
 * @author Tiago Peres
 */
public class ChessLikeSquare extends Square{
    
    public ChessLikeSquare(int position){
        super(position);
    }
    
    public ChessLikeSquare(int row, int column){
        super(8 * row + column);
    }
    
    /**
     * @return the row in the board where this square is placed
     */
    public int getRow(){
        return getPosition() / 8;
    }
    
    /**
     * @return the column in the board where this square is placed
     */
    public int getColumn(){
        return getPosition() % 8;
    }
}
